 <style>
.ttl{width:80px;text-align:right;display-inline:block;}
.pop_cont_input{line-height:30px;} .pop_cont_input input{pading:0px 5px;} .pop_cont_input select{height:28px;}
 .pop_cont .shangmian li{width:380px;float:left;}
 .pop_cont .xiamain li{width:750px;}
 </style>
 <div class="pop_cont" style="width:820px;left:30%;">
 <input type="hidden" value="<?php echo $id; ?>" id="editId" />
       <!--title-->
       <h3><?php echo $title;?></h3>
       <!--content-->
       <div class="pop_cont_input">
        <ul class="shangmian">
        
        
         <li>
          <span class="ttl">编号</span>
			<?php echo $info['dveid'];?>
         </li>
         
               
         <li>
          <span class="ttl">名称</span>
          <?php echo $info['dvename'];?>
         </li>
         
         <li>
          <span class="ttl">状态</span>
          <select name="s_stat" id="s_stat" class="select" >
                  <option value="0">正常</option>
                  <option value="1">库存</option>
		          <option value="2">外借</option>
		          <option value="3">报废</option>
		          <option value="4">报修</option>
		          
		          
          </select>
         </li>
         <br style="clear:both;height:0px;width:0px;">
        </ul>
         
         <ul class="xiamian">
         <li >
          <span class="ttl"></span>
          <select name="ser_key" id="ser_key" class="select" >
          <option value="uname">登录账号</option>
          <option value="nickname">姓名</option>
      </select>
      <input type="text" class="textbox" name="ser_val" id="ser_val" value="" placeholder=""/>
          <select name="firstDep" id="firstDep" class="select firstDeptR">
	       <option value="">--部门--</option>
	       <?php
	       
	       foreach($FirstDepList as $key=>$val)
	   		{
	   		?>
	        <option value="<?php echo $val['id']; ?>"  ><?php echo $val['depname']; ?></option>
		   <?php
	       }
       		?>
          </select>
          <select name="secondDep" id="secondDep" class="select secondDeptR">
	       <option value="">--选择--</option>
	       <?php
	       foreach($SecondDepList as $key=>$val)
	   		{
	   		?>
	        <option value="<?php echo $val['id']; ?>" ><?php echo $val['depname']; ?></option>
		   <?php
	       }
       		?>
          </select>
	      <select name="group" id="group" class="select">
	       <option value="">--角色--</option>
	       <?php
	       foreach($groupList as $key=>$val)
	      {
	      ?>
	        <option value="<?php echo $val['id']; ?>"><?php echo $val['gname']; ?></option>
		   <?php
	       }
       ?>
	      </select>
	      
	      <input type="button" value="搜索" class="group_btn chaxu" id="chaxu"  />
          
         </li>
         <li>
         <div class="ttl" style="float:left;line-height:42px;">责任人</div>
         <div id="userLists" style="float:left;width: 700px;line-height:42px;color:red;">提示：请搜索，并选择用户</div>
         </li>
        
         
         
       
        
        </ul>
       </div>
      
       <!--bottom:operate->button-->
       <div class="btm_btn">
       <input type="hidden" name="devlistID" id="devlistID" value="<?php echo $info['id'];?>" />
        <input type="button" value="调配" class="input_btn trueBtn"/>
        <input type="button" value="关闭" class="input_btn falseBtn"/>
       </div>
      </div>
      
      <script>
      $(function(){
     	 
	       $(".trueBtn").unbind().bind("click",function(){
			 
	    	var that =this;
   		    var url="/admin/devlist/depthData";
   		    var id=$("#devlistID").val();
   		    var stat=$("#s_stat").val();
   		    var users=$("input[name='userList']:checked").val();
   		    if(users ===undefined)
   		    {
   		    	ErrTiShi("请选择资产责任人");
   		    	return false;
   		    }
   		    
   		    
   		    
   
   		    var param={
   				   id:id,
   				   users:users,
   				   stat:stat,
   				   sys_opt:'1'//后台判断编辑操作
   		    };
			 AjaxRequest(url,param,function(data){
  			   if(data.err==0)
  			   {
  				   SuccessTiShi("操作成功");
  				   $(".pop_bg").fadeOut();
  				   $(".pop_bg").html('');
  				   myResearch();
  			   }
  			   else
  			   {
  				   ErrTiShi(data.msg);
  			   }
  		   	});
			 
		  });
		   //弹出：取消或关闭按钮
		   $(".falseBtn").unbind().bind("click",function(){
		
			 $(".pop_bg").fadeOut();
		   });
		   
 $(".firstDept").change(function(){
			   
			   var url="/admin/user/selectDeptChange";
	   		    var id=$(this).val();
	   		   
	   		    var param={
	   				   id:id
	   				   
	   		    };
			   AjaxRequest(url,param,function(data){
	  			   if(data.err==0)
	  			   {
	  				   var html='<option value="">--选择--</option>';
	  				   $.each(data.data,function(i,v){
	  					 html +='<option value="'+v.id+'">'+v.depname+'</option>'
	  				   })
	  				   $(".secondDept").html(html);
	  			   }
	  			   else
	  			   {
	  				   ErrTiShi("操作失败");
	  			   }
	  		   	});
			   
		   });
 
 
 $(".firstTypeRS").change(function(){
	   
	   var url="/admin/devlist/selectTypeChange";
		    var id=$(this).val();
		   
		    var param={
				   id:id
				   
		    };
	   AjaxRequest(url,param,function(data){
		   if(data.err==0)
		   {
			   var html='<option value="">--选择--</option>';
			   $.each(data.data,function(i,v){
				 html +='<option value="'+v.id+'">'+v.dname+'</option>'
			   })
			   $(".secondTypeRS").html(html);
		   }
		   else
		   {
			   ErrTiShi("操作失败");
		   }
	   	});
	   
 	});
 
		 $(".chaxu").click(function(){
			   
			   var url="/admin/user/researchUser";
			   var ser_key =$("#ser_key").val();
			   var ser_val =$("#ser_val").val();
			   var firstDep =$("#firstDep").val();
			   var secondDep =$("#secondDep").val();
			   var group =$("#group").val();
			 
			   var param={
					   ser_key:ser_key, 
					   ser_val:ser_val, 
					   group:group, 
					   firstDep:firstDep, 
					   secondDep:secondDep
			   };
			   AjaxRequest(url,param,function(data){
				   if(data.err==0)
				   {
					   var html='';
					   $.each(data.data,function(i,v){
						 html +='<label class="single_selection"><input type="radio" value="'+v.id+'" class="userList" name="userList"/>'+v.uname+'['+v.nickname+']'+'</label>';
					   });
					   if(html=="")
					   {
						   html="暂未搜索到用户";
					   }
					   $("#userLists").html(html);
				   }
				   else
				   {
					   ErrTiShi("获取数据失败");
				   }
			   	});
		 
			});
 
 });
      </script>